package assignment.ton.def;

import java.io.Serializable;

/**
 * An extension of the parameter class, contains default value.
 * @author Tim
 *
 */
public class Variable extends Parameter implements Serializable{
	private static final long serialVersionUID = -7654653814628068622L;
	private String defaultValue;
	public Variable(String setName, String setType, boolean setMany, String setDefault) {
		super(setName, setType, setMany);
		defaultValue = setDefault;
	}
	public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
	@Override
	public String toString(){
		String isMany = "ONE";
		if(many){ isMany = "MANY"; }
		return name+": "+type+" "+isMany;
	}
}
